import request from "@/utils/request";
export const getSalaryTotalAndType = () => {
  return request.request({
    url: `/admin/salary/salarTotalType`,
    method: "get",
  });
}


// 获取全部
export const getSalary = () => {
  return request.request({
    url: `/admin/salary/salaries`,
    method: "get",
  });
}

// 删除
export const deleteSalary = (id) => {
  return request.request({
    url: `/admin/salary/delete/${id}`,
    method: "get",
  });
}

// 查询单个
export const getSalaryById = (id) => {
  return request.request({
    url: `/admin/salary/${id}`,
    method: "get",
  });
}


//更新
export const updateSalary = (SalaryRequestData) => {
  return request.request({
    url: `/admin/salary/update`,
    data:SalaryRequestData,
    method: "post",
  });
}

//添加
export const addSalary = (SalaryRequestData) => {
  return request.request({
    url: `/admin/salary/add`,
    data:SalaryRequestData,
    method: "post",
  });
}